package com.dhms.vostok1.data.message_center

import com.squareup.moshi.Json

data class ReceiveMessageData(
    /* 消息类型 */
    @Json(name = "message_type")
    val messageType: String?,
    @Json(name = "group")
    val group: MessageCenterType?,
    /* 消息id */
    @Json(name = "id")
    val messageId: Int,
    /*  消息时间 */
    @Json(name = "ts")
    val messageTime: String?,
    /*  消息标题 */
    @Json(name = "title")
    val title: String?,
    @Json(name = "profile")
    val body: MessageBodyData?
) {
    val messageItemData: MessageItemData?
        get() {
            return MessageItemData(
                title,
                messageTime,
                messageType,
                0,
                body,
                messageId,
                group
            )
        }
}

